extends Sprite2D

class_name Bullet

var targetPos: Vector2
var endCall: Callable

func _process(delta: float) -> void:
	position = lerp(position, targetPos, 0.15)
	
	if position.distance_to(targetPos) < 4:
		
		if endCall:
			endCall.call()	

		queue_free()
		
